<script lang="ts" setup>
import { useRouter } from 'vue-router';
import { Button } from 'ant-design-vue';
import { ArrowLeftOutlined } from '@ant-design/icons-vue';

import Icon403 from './icon-403.vue';

import CommonPageName from '@/fierce/pages/common-page-name';

const router = useRouter();
function toIndex() {
  router.push({
    name: CommonPageName.INDEX,
  });
}
</script>

<template>
  <div class="flex flex-col justify-center page-container">
    <div class="text-center">
      <Icon403 />
    </div>
    <div class="text-center">
      <h1 class="text-base text-gray-500">
        抱歉，你无权访问该页面
      </h1>
      <Button type="primary" :icon="h(ArrowLeftOutlined)" @click="toIndex">
        回到首页
      </Button>
    </div>
  </div>
</template>

<style lang="less" scoped>
.page-container {
  width: 100%;
  border-radius: 4px;
  padding: 50px 0;
  height: 100vh;

  .text-center {
    h1 {
      color: #666;
      padding: 20px 0;
    }
  }

  img {
    width: 350px;
    margin: 0 auto;
  }
}
</style>
